<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>edges_sub_pix [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_filters.html">过滤器</a> / <a href="toc_filters_edges.html">Edges</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">edges_sub_pix</span><span data-if="c" style="display:none;">edges_sub_pix</span><span data-if="cpp" style="display:none;">EdgesSubPix</span><span data-if="dotnet" style="display:none;">EdgesSubPix</span><span data-if="python" style="display:none;">edges_sub_pix</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">edges_sub_pix</span><span data-if="c" style="display:none;">edges_sub_pix</span><span data-if="cpp" style="display:none;">EdgesSubPix</span><span data-if="dotnet" style="display:none;">EdgesSubPix</span><span data-if="python" style="display:none;">edges_sub_pix</span></code> — Extract sub-pixel precise edges using Deriche, Lanser, Shen, or Canny
filters.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>edges_sub_pix</b>(<a href="#Image"><i>Image</i></a> : <a href="#Edges"><i>Edges</i></a> : <a href="#Filter"><i>Filter</i></a>, <a href="#Alpha"><i>Alpha</i></a>, <a href="#Low"><i>Low</i></a>, <a href="#High"><i>High</i></a> : )</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>edges_sub_pix</b>(const Hobject <a href="#Image"><i>Image</i></a>, Hobject* <a href="#Edges"><i>Edges</i></a>, const char* <a href="#Filter"><i>Filter</i></a>, double <a href="#Alpha"><i>Alpha</i></a>, const Hlong <a href="#Low"><i>Low</i></a>, const Hlong <a href="#High"><i>High</i></a>)</code></p>
<p>
<code>Herror <b>T_edges_sub_pix</b>(const Hobject <a href="#Image"><i>Image</i></a>, Hobject* <a href="#Edges"><i>Edges</i></a>, const Htuple <a href="#Filter"><i>Filter</i></a>, const Htuple <a href="#Alpha"><i>Alpha</i></a>, const Htuple <a href="#Low"><i>Low</i></a>, const Htuple <a href="#High"><i>High</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>EdgesSubPix</b>(const HObject&amp; <a href="#Image"><i>Image</i></a>, HObject* <a href="#Edges"><i>Edges</i></a>, const HTuple&amp; <a href="#Filter"><i>Filter</i></a>, const HTuple&amp; <a href="#Alpha"><i>Alpha</i></a>, const HTuple&amp; <a href="#Low"><i>Low</i></a>, const HTuple&amp; <a href="#High"><i>High</i></a>)</code></p>
<p>
<code><a href="HXLDCont.html">HXLDCont</a> <a href="HImage.html">HImage</a>::<b>EdgesSubPix</b>(const HString&amp; <a href="#Filter"><i>Filter</i></a>, double <a href="#Alpha"><i>Alpha</i></a>, const HTuple&amp; <a href="#Low"><i>Low</i></a>, const HTuple&amp; <a href="#High"><i>High</i></a>) const</code></p>
<p>
<code><a href="HXLDCont.html">HXLDCont</a> <a href="HImage.html">HImage</a>::<b>EdgesSubPix</b>(const HString&amp; <a href="#Filter"><i>Filter</i></a>, double <a href="#Alpha"><i>Alpha</i></a>, Hlong <a href="#Low"><i>Low</i></a>, Hlong <a href="#High"><i>High</i></a>) const</code></p>
<p>
<code><a href="HXLDCont.html">HXLDCont</a> <a href="HImage.html">HImage</a>::<b>EdgesSubPix</b>(const char* <a href="#Filter"><i>Filter</i></a>, double <a href="#Alpha"><i>Alpha</i></a>, Hlong <a href="#Low"><i>Low</i></a>, Hlong <a href="#High"><i>High</i></a>) const</code></p>
<p>
<code><a href="HXLDCont.html">HXLDCont</a> <a href="HImage.html">HImage</a>::<b>EdgesSubPix</b>(const wchar_t* <a href="#Filter"><i>Filter</i></a>, double <a href="#Alpha"><i>Alpha</i></a>, Hlong <a href="#Low"><i>Low</i></a>, Hlong <a href="#High"><i>High</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>EdgesSubPix</b>(<a href="HObject.html">HObject</a> <a href="#Image"><i>image</i></a>, out <a href="HObject.html">HObject</a> <a href="#Edges"><i>edges</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Filter"><i>filter</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Alpha"><i>alpha</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Low"><i>low</i></a>, <a href="HTuple.html">HTuple</a> <a href="#High"><i>high</i></a>)</code></p>
<p>
<code><a href="HXLDCont.html">HXLDCont</a> <a href="HImage.html">HImage</a>.<b>EdgesSubPix</b>(string <a href="#Filter"><i>filter</i></a>, double <a href="#Alpha"><i>alpha</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Low"><i>low</i></a>, <a href="HTuple.html">HTuple</a> <a href="#High"><i>high</i></a>)</code></p>
<p>
<code><a href="HXLDCont.html">HXLDCont</a> <a href="HImage.html">HImage</a>.<b>EdgesSubPix</b>(string <a href="#Filter"><i>filter</i></a>, double <a href="#Alpha"><i>alpha</i></a>, int <a href="#Low"><i>low</i></a>, int <a href="#High"><i>high</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>edges_sub_pix</b>(<a href="#Image"><i>image</i></a>: HObject, <a href="#Filter"><i>filter</i></a>: str, <a href="#Alpha"><i>alpha</i></a>: float, <a href="#Low"><i>low</i></a>: Union[int, float], <a href="#High"><i>high</i></a>: Union[int, float]) -&gt; HObject</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p><code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> detects step edges using recursively implemented
filters (according to Deriche, Lanser and Shen) or the conventionally
implemented “derivative of Gaussian” filter (using filter masks)
proposed by Canny.  Thus, the following edge operators are
available for <a href="#Filter"><i><code><span data-if="hdevelop" style="display:inline">Filter</span><span data-if="c" style="display:none">Filter</span><span data-if="cpp" style="display:none">Filter</span><span data-if="com" style="display:none">Filter</span><span data-if="dotnet" style="display:none">filter</span><span data-if="python" style="display:none">filter</span></code></i></a>:</p>
<p>
<i><span data-if="hdevelop" style="display:inline">'deriche1'</span><span data-if="c" style="display:none">"deriche1"</span><span data-if="cpp" style="display:none">"deriche1"</span><span data-if="com" style="display:none">"deriche1"</span><span data-if="dotnet" style="display:none">"deriche1"</span><span data-if="python" style="display:none">"deriche1"</span></i>, <i><span data-if="hdevelop" style="display:inline">'lanser1'</span><span data-if="c" style="display:none">"lanser1"</span><span data-if="cpp" style="display:none">"lanser1"</span><span data-if="com" style="display:none">"lanser1"</span><span data-if="dotnet" style="display:none">"lanser1"</span><span data-if="python" style="display:none">"lanser1"</span></i>, <i><span data-if="hdevelop" style="display:inline">'deriche2'</span><span data-if="c" style="display:none">"deriche2"</span><span data-if="cpp" style="display:none">"deriche2"</span><span data-if="com" style="display:none">"deriche2"</span><span data-if="dotnet" style="display:none">"deriche2"</span><span data-if="python" style="display:none">"deriche2"</span></i>,
<i><span data-if="hdevelop" style="display:inline">'lanser2'</span><span data-if="c" style="display:none">"lanser2"</span><span data-if="cpp" style="display:none">"lanser2"</span><span data-if="com" style="display:none">"lanser2"</span><span data-if="dotnet" style="display:none">"lanser2"</span><span data-if="python" style="display:none">"lanser2"</span></i>, <i><span data-if="hdevelop" style="display:inline">'shen'</span><span data-if="c" style="display:none">"shen"</span><span data-if="cpp" style="display:none">"shen"</span><span data-if="com" style="display:none">"shen"</span><span data-if="dotnet" style="display:none">"shen"</span><span data-if="python" style="display:none">"shen"</span></i>, <i><span data-if="hdevelop" style="display:inline">'mshen'</span><span data-if="c" style="display:none">"mshen"</span><span data-if="cpp" style="display:none">"mshen"</span><span data-if="com" style="display:none">"mshen"</span><span data-if="dotnet" style="display:none">"mshen"</span><span data-if="python" style="display:none">"mshen"</span></i>, <i><span data-if="hdevelop" style="display:inline">'canny'</span><span data-if="c" style="display:none">"canny"</span><span data-if="cpp" style="display:none">"canny"</span><span data-if="com" style="display:none">"canny"</span><span data-if="dotnet" style="display:none">"canny"</span><span data-if="python" style="display:none">"canny"</span></i>,
<i><span data-if="hdevelop" style="display:inline">'sobel'</span><span data-if="c" style="display:none">"sobel"</span><span data-if="cpp" style="display:none">"sobel"</span><span data-if="com" style="display:none">"sobel"</span><span data-if="dotnet" style="display:none">"sobel"</span><span data-if="python" style="display:none">"sobel"</span></i> und <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i>.
</p>
<p>The extracted edges are returned as sub-pixel precise XLD contours
in <a href="#Edges"><i><code><span data-if="hdevelop" style="display:inline">Edges</span><span data-if="c" style="display:none">Edges</span><span data-if="cpp" style="display:none">Edges</span><span data-if="com" style="display:none">Edges</span><span data-if="dotnet" style="display:none">edges</span><span data-if="python" style="display:none">edges</span></code></i></a>.  For all edge operators except
<i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i>, the following attributes are defined for each
edge point (see <a href="get_contour_attrib_xld.html"><code><span data-if="hdevelop" style="display:inline">get_contour_attrib_xld</span><span data-if="c" style="display:none">get_contour_attrib_xld</span><span data-if="cpp" style="display:none">GetContourAttribXld</span><span data-if="com" style="display:none">GetContourAttribXld</span><span data-if="dotnet" style="display:none">GetContourAttribXld</span><span data-if="python" style="display:none">get_contour_attrib_xld</span></code></a> for further details):
</p>
<dl class="generic">

<dt><b><i><span data-if="hdevelop" style="display:inline">'edge_direction'</span><span data-if="c" style="display:none">"edge_direction"</span><span data-if="cpp" style="display:none">"edge_direction"</span><span data-if="com" style="display:none">"edge_direction"</span><span data-if="dotnet" style="display:none">"edge_direction"</span><span data-if="python" style="display:none">"edge_direction"</span></i>:</b></dt>
<dd>
<p>
 Gives the direction of the edge (not of
the XLD contour), calculated from the image
gradients in horizontal and vertical
direction. The angles [rad] are given with
respect to the column axis of the image.</p>

</dd>

<dt><b><i><span data-if="hdevelop" style="display:inline">'angle'</span><span data-if="c" style="display:none">"angle"</span><span data-if="cpp" style="display:none">"angle"</span><span data-if="com" style="display:none">"angle"</span><span data-if="dotnet" style="display:none">"angle"</span><span data-if="python" style="display:none">"angle"</span></i>:</b></dt>
<dd><p>
 Direction of the normal vectors to the contour in
radians (oriented such that the normal vectors point to
the right side of the contour as the contour is
traversed from start to end point; the angles
are given with respect to the row axis of the
image).
</p></dd>

<dt><b><i><span data-if="hdevelop" style="display:inline">'response'</span><span data-if="c" style="display:none">"response"</span><span data-if="cpp" style="display:none">"response"</span><span data-if="com" style="display:none">"response"</span><span data-if="dotnet" style="display:none">"response"</span><span data-if="python" style="display:none">"response"</span></i>:</b></dt>
<dd><p>
 Edge amplitude (gradient magnitude).
</p></dd>
</dl>
<p>The “filter width” (i.e., the amount of smoothing) can be chosen
arbitrarily for all edge operators except <i><span data-if="hdevelop" style="display:inline">'sobel'</span><span data-if="c" style="display:none">"sobel"</span><span data-if="cpp" style="display:none">"sobel"</span><span data-if="com" style="display:none">"sobel"</span><span data-if="dotnet" style="display:none">"sobel"</span><span data-if="python" style="display:none">"sobel"</span></i> and
<i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i>, and can be estimated by calling
<a href="info_edges.html"><code><span data-if="hdevelop" style="display:inline">info_edges</span><span data-if="c" style="display:none">info_edges</span><span data-if="cpp" style="display:none">InfoEdges</span><span data-if="com" style="display:none">InfoEdges</span><span data-if="dotnet" style="display:none">InfoEdges</span><span data-if="python" style="display:none">info_edges</span></code></a> for concrete values of the parameter
<a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a>. For all filters (Deriche, Lanser and Shen filters), the
“filter width” decreases for increasing <a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a>. The only exception
is the Canny filter, where an increasing <a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a> also causes an
increase of the “filter width”. “Wide” filters exhibit a larger
invariance to noise, but also a decreased ability to detect small
details.  Non-recursive filters, such as the Canny filter, are
realized using filter masks, and thus the execution time increases
for increasing filter width.  In contrast, the execution time for
recursive filters does not depend on the filter width.  Thus,
arbitrary filter widths are possible using the Deriche, Lanser and
Shen filters without increasing the run time of 该算子.  The
resulting advantage in speed compared to the Canny operator
naturally increases for larger filter widths.  As border treatment,
the recursive operators assume that the images to be zero outside of
the image, while the Canny operator repeats the gray value at the
image's border.  The signal-noise-ratio of the filters is
comparable for the following choices of <a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a>:
<span class="pre">
     Alpha('lanser1')   = Alpha('deriche1'),
     Alpha('deriche2')  = Alpha('deriche1') / 2,
     Alpha('lanser2')   = Alpha('deriche2'),
     Alpha('shen')      = Alpha('deriche1') / 2,
     Alpha('mshen')     = Alpha('shen'),
     Alpha('canny')     = 1.77 / Alpha('deriche1').
</span>
The originally proposed recursive filters (<i><span data-if="hdevelop" style="display:inline">'deriche1'</span><span data-if="c" style="display:none">"deriche1"</span><span data-if="cpp" style="display:none">"deriche1"</span><span data-if="com" style="display:none">"deriche1"</span><span data-if="dotnet" style="display:none">"deriche1"</span><span data-if="python" style="display:none">"deriche1"</span></i>,
<i><span data-if="hdevelop" style="display:inline">'deriche2'</span><span data-if="c" style="display:none">"deriche2"</span><span data-if="cpp" style="display:none">"deriche2"</span><span data-if="com" style="display:none">"deriche2"</span><span data-if="dotnet" style="display:none">"deriche2"</span><span data-if="python" style="display:none">"deriche2"</span></i>, <i><span data-if="hdevelop" style="display:inline">'shen'</span><span data-if="c" style="display:none">"shen"</span><span data-if="cpp" style="display:none">"shen"</span><span data-if="com" style="display:none">"shen"</span><span data-if="dotnet" style="display:none">"shen"</span><span data-if="python" style="display:none">"shen"</span></i>) return a biased estimate of the
amplitude of diagonal edges.
This bias is removed in the corresponding modified version
of 该算子s (<i><span data-if="hdevelop" style="display:inline">'lanser1'</span><span data-if="c" style="display:none">"lanser1"</span><span data-if="cpp" style="display:none">"lanser1"</span><span data-if="com" style="display:none">"lanser1"</span><span data-if="dotnet" style="display:none">"lanser1"</span><span data-if="python" style="display:none">"lanser1"</span></i>, <i><span data-if="hdevelop" style="display:inline">'lanser2'</span><span data-if="c" style="display:none">"lanser2"</span><span data-if="cpp" style="display:none">"lanser2"</span><span data-if="com" style="display:none">"lanser2"</span><span data-if="dotnet" style="display:none">"lanser2"</span><span data-if="python" style="display:none">"lanser2"</span></i> and
<i><span data-if="hdevelop" style="display:inline">'mshen'</span><span data-if="c" style="display:none">"mshen"</span><span data-if="cpp" style="display:none">"mshen"</span><span data-if="com" style="display:none">"mshen"</span><span data-if="dotnet" style="display:none">"mshen"</span><span data-if="python" style="display:none">"mshen"</span></i>), while maintaining the same execution speed.
</p>
<p>For relatively small filter widths (11 x 11),
i.e., for <a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a> (<i><span data-if="hdevelop" style="display:inline">'lanser2'</span><span data-if="c" style="display:none">"lanser2"</span><span data-if="cpp" style="display:none">"lanser2"</span><span data-if="com" style="display:none">"lanser2"</span><span data-if="dotnet" style="display:none">"lanser2"</span><span data-if="python" style="display:none">"lanser2"</span></i> = <i>0.5</i>), all filters
yield similar results.
Only for “wider” filters differences begin to appear:
the Shen filters begin to yield qualitatively inferior results.
However, they are the fastest of the implemented operators that
support arbitrary mask sizes, closely followed by the Deriche
operators.  The two Sobel filters, which use a fixed mask size of
(3 x 3), are faster than the other filters.  Of
these two, the filter <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i> is significantly faster
than <i><span data-if="hdevelop" style="display:inline">'sobel'</span><span data-if="c" style="display:none">"sobel"</span><span data-if="cpp" style="display:none">"sobel"</span><span data-if="com" style="display:none">"sobel"</span><span data-if="dotnet" style="display:none">"sobel"</span><span data-if="python" style="display:none">"sobel"</span></i>.
</p>
<p><code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> links the edge points into edges by using
an algorithm similar to a hysteresis threshold operation, which is
also used in <a href="lines_gauss.html"><code><span data-if="hdevelop" style="display:inline">lines_gauss</span><span data-if="c" style="display:none">lines_gauss</span><span data-if="cpp" style="display:none">LinesGauss</span><span data-if="com" style="display:none">LinesGauss</span><span data-if="dotnet" style="display:none">LinesGauss</span><span data-if="python" style="display:none">lines_gauss</span></code></a>.  Points with an amplitude
larger than <a href="#High"><i><code><span data-if="hdevelop" style="display:inline">High</span><span data-if="c" style="display:none">High</span><span data-if="cpp" style="display:none">High</span><span data-if="com" style="display:none">High</span><span data-if="dotnet" style="display:none">high</span><span data-if="python" style="display:none">high</span></code></i></a> are immediately accepted as belonging to
an edge, while points with an amplitude smaller than <a href="#Low"><i><code><span data-if="hdevelop" style="display:inline">Low</span><span data-if="c" style="display:none">Low</span><span data-if="cpp" style="display:none">Low</span><span data-if="com" style="display:none">Low</span><span data-if="dotnet" style="display:none">low</span><span data-if="python" style="display:none">low</span></code></i></a>
are rejected.  All other points are accepted as edges if they are
connected to accepted edge points (see also <a href="lines_gauss.html"><code><span data-if="hdevelop" style="display:inline">lines_gauss</span><span data-if="c" style="display:none">lines_gauss</span><span data-if="cpp" style="display:none">LinesGauss</span><span data-if="com" style="display:none">LinesGauss</span><span data-if="dotnet" style="display:none">LinesGauss</span><span data-if="python" style="display:none">lines_gauss</span></code></a>
and <a href="hysteresis_threshold.html"><code><span data-if="hdevelop" style="display:inline">hysteresis_threshold</span><span data-if="c" style="display:none">hysteresis_threshold</span><span data-if="cpp" style="display:none">HysteresisThreshold</span><span data-if="com" style="display:none">HysteresisThreshold</span><span data-if="dotnet" style="display:none">HysteresisThreshold</span><span data-if="python" style="display:none">hysteresis_threshold</span></code></a>).
</p>
<p>Because edge extractors are often unable to extract certain
junctions, a mode that tries to extract these missing junctions by
different means can be selected by appending <i><span data-if="hdevelop" style="display:inline">'_junctions'</span><span data-if="c" style="display:none">"_junctions"</span><span data-if="cpp" style="display:none">"_junctions"</span><span data-if="com" style="display:none">"_junctions"</span><span data-if="dotnet" style="display:none">"_junctions"</span><span data-if="python" style="display:none">"_junctions"</span></i>
to the values of <a href="#Filter"><i><code><span data-if="hdevelop" style="display:inline">Filter</span><span data-if="c" style="display:none">Filter</span><span data-if="cpp" style="display:none">Filter</span><span data-if="com" style="display:none">Filter</span><span data-if="dotnet" style="display:none">filter</span><span data-if="python" style="display:none">filter</span></code></i></a> that are described above.  This
mode is analogous to the mode for completing junctions that is
available in <a href="lines_gauss.html"><code><span data-if="hdevelop" style="display:inline">lines_gauss</span><span data-if="c" style="display:none">lines_gauss</span><span data-if="cpp" style="display:none">LinesGauss</span><span data-if="com" style="display:none">LinesGauss</span><span data-if="dotnet" style="display:none">LinesGauss</span><span data-if="python" style="display:none">lines_gauss</span></code></a>.
</p>
<p>The edge operator <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i> has the same semantics as
all the other edge operators.  Internally, however, it is based on
significantly simplified variants of the individual processing steps
(hysteresis thresholding, edge point linking, and extraction of the
subpixel edge positions).  Therefore, <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i> in some
cases may return slightly less accurate edge positions and may
select different edge parts.
</p>
<p><code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> can be executed on OpenCL devices for the filter
types <i><span data-if="hdevelop" style="display:inline">'canny'</span><span data-if="c" style="display:none">"canny"</span><span data-if="cpp" style="display:none">"canny"</span><span data-if="com" style="display:none">"canny"</span><span data-if="dotnet" style="display:none">"canny"</span><span data-if="python" style="display:none">"canny"</span></i> and <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i>. This will require
up to width*height*29 bytes of pinned memory. Since allocating memory
is an expensive operation, it would make sense to set the pinned memory
cache to at least this size (using <a href="set_compute_device_param.html"><code><span data-if="hdevelop" style="display:inline">set_compute_device_param</span><span data-if="c" style="display:none">set_compute_device_param</span><span data-if="cpp" style="display:none">SetComputeDeviceParam</span><span data-if="com" style="display:none">SetComputeDeviceParam</span><span data-if="dotnet" style="display:none">SetComputeDeviceParam</span><span data-if="python" style="display:none">set_compute_device_param</span></code></a> for
parameter <i><span data-if="hdevelop" style="display:inline">'pinned_mem_cache_capacity'</span><span data-if="c" style="display:none">"pinned_mem_cache_capacity"</span><span data-if="cpp" style="display:none">"pinned_mem_cache_capacity"</span><span data-if="com" style="display:none">"pinned_mem_cache_capacity"</span><span data-if="dotnet" style="display:none">"pinned_mem_cache_capacity"</span><span data-if="python" style="display:none">"pinned_mem_cache_capacity"</span></i>, or to disable pinned memory
completely (using <a href="set_compute_device_param.html"><code><span data-if="hdevelop" style="display:inline">set_compute_device_param</span><span data-if="c" style="display:none">set_compute_device_param</span><span data-if="cpp" style="display:none">SetComputeDeviceParam</span><span data-if="com" style="display:none">SetComputeDeviceParam</span><span data-if="dotnet" style="display:none">SetComputeDeviceParam</span><span data-if="python" style="display:none">set_compute_device_param</span></code></a> for parameter
<i><span data-if="hdevelop" style="display:inline">'alloc_pinned'</span><span data-if="c" style="display:none">"alloc_pinned"</span><span data-if="cpp" style="display:none">"alloc_pinned"</span><span data-if="com" style="display:none">"alloc_pinned"</span><span data-if="dotnet" style="display:none">"alloc_pinned"</span><span data-if="python" style="display:none">"alloc_pinned"</span></i>), in which case the normal memory cache is
used. Note that the results can vary from the CPU implementation.</p>
<h2 id="sec_attention">注意</h2>
<p>Since <code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> uses Gauss convolution internally for the
<i><span data-if="hdevelop" style="display:inline">'canny'</span><span data-if="c" style="display:none">"canny"</span><span data-if="cpp" style="display:none">"canny"</span><span data-if="com" style="display:none">"canny"</span><span data-if="dotnet" style="display:none">"canny"</span><span data-if="python" style="display:none">"canny"</span></i> filter, the same limitations for OpenCL apply as for
<a href="derivate_gauss.html"><code><span data-if="hdevelop" style="display:inline">derivate_gauss</span><span data-if="c" style="display:none">derivate_gauss</span><span data-if="cpp" style="display:none">DerivateGauss</span><span data-if="com" style="display:none">DerivateGauss</span><span data-if="dotnet" style="display:none">DerivateGauss</span><span data-if="python" style="display:none">derivate_gauss</span></code></a>: <a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a> must be chosen small enough that
the required filter mask is less than 129 pixels in size. Also,
<code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> is not available on OpenCL devices for HALCON XL, as
double precision floating point arithmetic would be required, but OpenCL
devices are optimized for single precision arithmetic.
</p>
<p>Note that filter operators may return unexpected results if
an image with a reduced domain is used as input. Please refer to the
chapter <a href="toc_filters.html">过滤器</a>.</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
    
      <li>支持OpenCL计算设备。</li>
    
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  
    <li>Automatically parallelized on internal data level.</li>
  
</ul>
<p>This operator supports canceling timeouts and interrupts.</p>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="Image" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></b> (input_object)  </span><span>singlechannelimage <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject</span> (byte / uint2 / real)</span>
</div>
<p class="pardesc">Input image.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Edges" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Edges</span><span data-if="c" style="display:none">Edges</span><span data-if="cpp" style="display:none">Edges</span><span data-if="com" style="display:none">Edges</span><span data-if="dotnet" style="display:none">edges</span><span data-if="python" style="display:none">edges</span></code></b> (output_object)  </span><span>xld_cont-array <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HXLDCont.html">HXLDCont</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HXLDCont.html">HXLDCont</a></span><span data-if="c" style="display:none">Hobject *</span></span>
</div>
<p class="pardesc">Extracted edges.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="Filter" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Filter</span><span data-if="c" style="display:none">Filter</span><span data-if="cpp" style="display:none">Filter</span><span data-if="com" style="display:none">Filter</span><span data-if="dotnet" style="display:none">filter</span><span data-if="python" style="display:none">filter</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Edge operator to be applied.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'canny'</span>
    <span data-if="c" style="display:none">"canny"</span>
    <span data-if="cpp" style="display:none">"canny"</span>
    <span data-if="com" style="display:none">"canny"</span>
    <span data-if="dotnet" style="display:none">"canny"</span>
    <span data-if="python" style="display:none">"canny"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'canny'</span><span data-if="c" style="display:none">"canny"</span><span data-if="cpp" style="display:none">"canny"</span><span data-if="com" style="display:none">"canny"</span><span data-if="dotnet" style="display:none">"canny"</span><span data-if="python" style="display:none">"canny"</span>, <span data-if="hdevelop" style="display:inline">'canny_junctions'</span><span data-if="c" style="display:none">"canny_junctions"</span><span data-if="cpp" style="display:none">"canny_junctions"</span><span data-if="com" style="display:none">"canny_junctions"</span><span data-if="dotnet" style="display:none">"canny_junctions"</span><span data-if="python" style="display:none">"canny_junctions"</span>, <span data-if="hdevelop" style="display:inline">'deriche1'</span><span data-if="c" style="display:none">"deriche1"</span><span data-if="cpp" style="display:none">"deriche1"</span><span data-if="com" style="display:none">"deriche1"</span><span data-if="dotnet" style="display:none">"deriche1"</span><span data-if="python" style="display:none">"deriche1"</span>, <span data-if="hdevelop" style="display:inline">'deriche1_junctions'</span><span data-if="c" style="display:none">"deriche1_junctions"</span><span data-if="cpp" style="display:none">"deriche1_junctions"</span><span data-if="com" style="display:none">"deriche1_junctions"</span><span data-if="dotnet" style="display:none">"deriche1_junctions"</span><span data-if="python" style="display:none">"deriche1_junctions"</span>, <span data-if="hdevelop" style="display:inline">'deriche2'</span><span data-if="c" style="display:none">"deriche2"</span><span data-if="cpp" style="display:none">"deriche2"</span><span data-if="com" style="display:none">"deriche2"</span><span data-if="dotnet" style="display:none">"deriche2"</span><span data-if="python" style="display:none">"deriche2"</span>, <span data-if="hdevelop" style="display:inline">'deriche2_junctions'</span><span data-if="c" style="display:none">"deriche2_junctions"</span><span data-if="cpp" style="display:none">"deriche2_junctions"</span><span data-if="com" style="display:none">"deriche2_junctions"</span><span data-if="dotnet" style="display:none">"deriche2_junctions"</span><span data-if="python" style="display:none">"deriche2_junctions"</span>, <span data-if="hdevelop" style="display:inline">'lanser1'</span><span data-if="c" style="display:none">"lanser1"</span><span data-if="cpp" style="display:none">"lanser1"</span><span data-if="com" style="display:none">"lanser1"</span><span data-if="dotnet" style="display:none">"lanser1"</span><span data-if="python" style="display:none">"lanser1"</span>, <span data-if="hdevelop" style="display:inline">'lanser1_junctions'</span><span data-if="c" style="display:none">"lanser1_junctions"</span><span data-if="cpp" style="display:none">"lanser1_junctions"</span><span data-if="com" style="display:none">"lanser1_junctions"</span><span data-if="dotnet" style="display:none">"lanser1_junctions"</span><span data-if="python" style="display:none">"lanser1_junctions"</span>, <span data-if="hdevelop" style="display:inline">'lanser2'</span><span data-if="c" style="display:none">"lanser2"</span><span data-if="cpp" style="display:none">"lanser2"</span><span data-if="com" style="display:none">"lanser2"</span><span data-if="dotnet" style="display:none">"lanser2"</span><span data-if="python" style="display:none">"lanser2"</span>, <span data-if="hdevelop" style="display:inline">'lanser2_junctions'</span><span data-if="c" style="display:none">"lanser2_junctions"</span><span data-if="cpp" style="display:none">"lanser2_junctions"</span><span data-if="com" style="display:none">"lanser2_junctions"</span><span data-if="dotnet" style="display:none">"lanser2_junctions"</span><span data-if="python" style="display:none">"lanser2_junctions"</span>, <span data-if="hdevelop" style="display:inline">'mshen'</span><span data-if="c" style="display:none">"mshen"</span><span data-if="cpp" style="display:none">"mshen"</span><span data-if="com" style="display:none">"mshen"</span><span data-if="dotnet" style="display:none">"mshen"</span><span data-if="python" style="display:none">"mshen"</span>, <span data-if="hdevelop" style="display:inline">'mshen_junctions'</span><span data-if="c" style="display:none">"mshen_junctions"</span><span data-if="cpp" style="display:none">"mshen_junctions"</span><span data-if="com" style="display:none">"mshen_junctions"</span><span data-if="dotnet" style="display:none">"mshen_junctions"</span><span data-if="python" style="display:none">"mshen_junctions"</span>, <span data-if="hdevelop" style="display:inline">'shen'</span><span data-if="c" style="display:none">"shen"</span><span data-if="cpp" style="display:none">"shen"</span><span data-if="com" style="display:none">"shen"</span><span data-if="dotnet" style="display:none">"shen"</span><span data-if="python" style="display:none">"shen"</span>, <span data-if="hdevelop" style="display:inline">'shen_junctions'</span><span data-if="c" style="display:none">"shen_junctions"</span><span data-if="cpp" style="display:none">"shen_junctions"</span><span data-if="com" style="display:none">"shen_junctions"</span><span data-if="dotnet" style="display:none">"shen_junctions"</span><span data-if="python" style="display:none">"shen_junctions"</span>, <span data-if="hdevelop" style="display:inline">'sobel'</span><span data-if="c" style="display:none">"sobel"</span><span data-if="cpp" style="display:none">"sobel"</span><span data-if="com" style="display:none">"sobel"</span><span data-if="dotnet" style="display:none">"sobel"</span><span data-if="python" style="display:none">"sobel"</span>, <span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span>, <span data-if="hdevelop" style="display:inline">'sobel_junctions'</span><span data-if="c" style="display:none">"sobel_junctions"</span><span data-if="cpp" style="display:none">"sobel_junctions"</span><span data-if="com" style="display:none">"sobel_junctions"</span><span data-if="dotnet" style="display:none">"sobel_junctions"</span><span data-if="python" style="display:none">"sobel_junctions"</span></p>
<p class="pardesc"><span class="parcat">List of values (for compute devices):
      </span><span data-if="hdevelop" style="display:inline">'canny'</span><span data-if="c" style="display:none">"canny"</span><span data-if="cpp" style="display:none">"canny"</span><span data-if="com" style="display:none">"canny"</span><span data-if="dotnet" style="display:none">"canny"</span><span data-if="python" style="display:none">"canny"</span>, <span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="Alpha" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></b> (input_control)  </span><span>real <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Filter parameter: small values result in strong
smoothing, and thus less detail (opposite for
'canny').</p>
<p class="pardesc"><span class="parcat">Default:
      </span>1.0</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>0.1, 0.2, 0.3, 0.4, 0.5, 0.7, 0.9, 1.1</p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>0.01</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>0.1</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>Alpha &gt; 0.0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="Low" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Low</span><span data-if="c" style="display:none">Low</span><span data-if="cpp" style="display:none">Low</span><span data-if="com" style="display:none">Low</span><span data-if="dotnet" style="display:none">low</span><span data-if="python" style="display:none">low</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[int, float]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">real)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">double)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">double)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">double)</span></span>
</div>
<p class="pardesc">Lower threshold for the hysteresis threshold operation.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>20</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>5, 10, 15, 20, 25, 30, 40</p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>1</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>5</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>Low &gt; 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="High" class="parname"><b><code><span data-if="hdevelop" style="display:inline">High</span><span data-if="c" style="display:none">High</span><span data-if="cpp" style="display:none">High</span><span data-if="com" style="display:none">High</span><span data-if="dotnet" style="display:none">high</span><span data-if="python" style="display:none">high</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[int, float]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">real)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">double)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">double)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">double)</span></span>
</div>
<p class="pardesc">Upper threshold for the hysteresis threshold operation.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>40</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>10, 15, 20, 25, 30, 40, 50, 60, 70</p>
<p class="pardesc"><span class="parcat">Minimum increment:
      </span>1</p>
<p class="pardesc"><span class="parcat">Recommended increment:
      </span>5</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>High &gt; 0 &amp;&amp; High &gt;= Low</code></p>
</div>
<div data-if="hdevelop" style="display:inline">
<h2 id="sec_example_hdevelop">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
edges_sub_pix(Image,Edges,'lanser2',0.5,20,40)
</pre>
</div>
<div data-if="c" style="display:none">
<h2 id="sec_example_c">例程 (C)</h2>
<pre class="example">
read_image(&amp;Image,"fabrik");
edges_sub_pix(Image,&amp;Edges,"lanser2",0.5,20,40);
</pre>
</div>
<div data-if="cpp" style="display:none">
<h2 id="sec_example_cpp">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
edges_sub_pix(Image,Edges,'lanser2',0.5,20,40)
</pre>
</div>
<div data-if="com" style="display:none">
<h2 id="sec_example_com">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
edges_sub_pix(Image,Edges,'lanser2',0.5,20,40)
</pre>
</div>
<div data-if="dotnet" style="display:none">
<h2 id="sec_example_dotnet">例程 (HDevelop)</h2>
<pre class="example">
read_image(Image,'fabrik')
edges_sub_pix(Image,Edges,'lanser2',0.5,20,40)
</pre>
</div>
<h2 id="sec_complexity">Complexity</h2>
<p>Let A be the number of pixels in the domain of <a href="#Image"><i><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></i></a>.
Then the runtime complexity is O(A*<a href="#Alpha"><i><code><span data-if="hdevelop" style="display:inline">Alpha</span><span data-if="c" style="display:none">Alpha</span><span data-if="cpp" style="display:none">Alpha</span><span data-if="com" style="display:none">Alpha</span><span data-if="dotnet" style="display:none">alpha</span><span data-if="python" style="display:none">alpha</span></code></i></a>) for the Canny
filter and O(A) for the recursive Lanser, Deriche, and Shen
filters.
</p>
<p>The amount of temporary memory required is dependent on the height H
of the domain of <a href="#Image"><i><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></i></a> and the width W of <a href="#Image"><i><code><span data-if="hdevelop" style="display:inline">Image</span><span data-if="c" style="display:none">Image</span><span data-if="cpp" style="display:none">Image</span><span data-if="com" style="display:none">Image</span><span data-if="dotnet" style="display:none">image</span><span data-if="python" style="display:none">image</span></code></i></a>.
Let S = W*H, then <code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> requires at least 60*S
bytes of temporary memory during execution for all edge operators
except <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i>.  For <i><span data-if="hdevelop" style="display:inline">'sobel_fast'</span><span data-if="c" style="display:none">"sobel_fast"</span><span data-if="cpp" style="display:none">"sobel_fast"</span><span data-if="com" style="display:none">"sobel_fast"</span><span data-if="dotnet" style="display:none">"sobel_fast"</span><span data-if="python" style="display:none">"sobel_fast"</span></i>, at least
9*S bytes of temporary memory are required.</p>
<h2 id="sec_result">结果</h2>
<p><code><span data-if="hdevelop" style="display:inline">edges_sub_pix</span><span data-if="c" style="display:none">edges_sub_pix</span><span data-if="cpp" style="display:none">EdgesSubPix</span><span data-if="com" style="display:none">EdgesSubPix</span><span data-if="dotnet" style="display:none">EdgesSubPix</span><span data-if="python" style="display:none">edges_sub_pix</span></code> returns <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
     if all parameters are correct
and no error occurs during execution. If the input is empty the
behavior can be set via
<a href="set_system.html"><code><span data-if="hdevelop" style="display:inline">set_system('no_object_result',&lt;Result&gt;)</span><span data-if="c" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span><span data-if="cpp" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="com" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="dotnet" style="display:none">SetSystem("no_object_result",&lt;Result&gt;)</span><span data-if="python" style="display:none">set_system("no_object_result",&lt;Result&gt;)</span></code></a>.  If
necessary, an exception is raised.</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="segment_contours_xld.html"><span data-if="hdevelop" style="display:inline">segment_contours_xld</span><span data-if="c" style="display:none">segment_contours_xld</span><span data-if="cpp" style="display:none">SegmentContoursXld</span><span data-if="com" style="display:none">SegmentContoursXld</span><span data-if="dotnet" style="display:none">SegmentContoursXld</span><span data-if="python" style="display:none">segment_contours_xld</span></a></code>, 
<code><a href="gen_polygons_xld.html"><span data-if="hdevelop" style="display:inline">gen_polygons_xld</span><span data-if="c" style="display:none">gen_polygons_xld</span><span data-if="cpp" style="display:none">GenPolygonsXld</span><span data-if="com" style="display:none">GenPolygonsXld</span><span data-if="dotnet" style="display:none">GenPolygonsXld</span><span data-if="python" style="display:none">gen_polygons_xld</span></a></code>, 
<code><a href="select_shape_xld.html"><span data-if="hdevelop" style="display:inline">select_shape_xld</span><span data-if="c" style="display:none">select_shape_xld</span><span data-if="cpp" style="display:none">SelectShapeXld</span><span data-if="com" style="display:none">SelectShapeXld</span><span data-if="dotnet" style="display:none">SelectShapeXld</span><span data-if="python" style="display:none">select_shape_xld</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="sobel_dir.html"><span data-if="hdevelop" style="display:inline">sobel_dir</span><span data-if="c" style="display:none">sobel_dir</span><span data-if="cpp" style="display:none">SobelDir</span><span data-if="com" style="display:none">SobelDir</span><span data-if="dotnet" style="display:none">SobelDir</span><span data-if="python" style="display:none">sobel_dir</span></a></code>, 
<code><a href="frei_dir.html"><span data-if="hdevelop" style="display:inline">frei_dir</span><span data-if="c" style="display:none">frei_dir</span><span data-if="cpp" style="display:none">FreiDir</span><span data-if="com" style="display:none">FreiDir</span><span data-if="dotnet" style="display:none">FreiDir</span><span data-if="python" style="display:none">frei_dir</span></a></code>, 
<code><a href="kirsch_dir.html"><span data-if="hdevelop" style="display:inline">kirsch_dir</span><span data-if="c" style="display:none">kirsch_dir</span><span data-if="cpp" style="display:none">KirschDir</span><span data-if="com" style="display:none">KirschDir</span><span data-if="dotnet" style="display:none">KirschDir</span><span data-if="python" style="display:none">kirsch_dir</span></a></code>, 
<code><a href="prewitt_dir.html"><span data-if="hdevelop" style="display:inline">prewitt_dir</span><span data-if="c" style="display:none">prewitt_dir</span><span data-if="cpp" style="display:none">PrewittDir</span><span data-if="com" style="display:none">PrewittDir</span><span data-if="dotnet" style="display:none">PrewittDir</span><span data-if="python" style="display:none">prewitt_dir</span></a></code>, 
<code><a href="robinson_dir.html"><span data-if="hdevelop" style="display:inline">robinson_dir</span><span data-if="c" style="display:none">robinson_dir</span><span data-if="cpp" style="display:none">RobinsonDir</span><span data-if="com" style="display:none">RobinsonDir</span><span data-if="dotnet" style="display:none">RobinsonDir</span><span data-if="python" style="display:none">robinson_dir</span></a></code>, 
<code><a href="edges_image.html"><span data-if="hdevelop" style="display:inline">edges_image</span><span data-if="c" style="display:none">edges_image</span><span data-if="cpp" style="display:none">EdgesImage</span><span data-if="com" style="display:none">EdgesImage</span><span data-if="dotnet" style="display:none">EdgesImage</span><span data-if="python" style="display:none">edges_image</span></a></code>
</p>
<h2 id="sec_see">参考其它</h2>
<p>
<code><a href="info_edges.html"><span data-if="hdevelop" style="display:inline">info_edges</span><span data-if="c" style="display:none">info_edges</span><span data-if="cpp" style="display:none">InfoEdges</span><span data-if="com" style="display:none">InfoEdges</span><span data-if="dotnet" style="display:none">InfoEdges</span><span data-if="python" style="display:none">info_edges</span></a></code>, 
<code><a href="hysteresis_threshold.html"><span data-if="hdevelop" style="display:inline">hysteresis_threshold</span><span data-if="c" style="display:none">hysteresis_threshold</span><span data-if="cpp" style="display:none">HysteresisThreshold</span><span data-if="com" style="display:none">HysteresisThreshold</span><span data-if="dotnet" style="display:none">HysteresisThreshold</span><span data-if="python" style="display:none">hysteresis_threshold</span></a></code>, 
<code><a href="bandpass_image.html"><span data-if="hdevelop" style="display:inline">bandpass_image</span><span data-if="c" style="display:none">bandpass_image</span><span data-if="cpp" style="display:none">BandpassImage</span><span data-if="com" style="display:none">BandpassImage</span><span data-if="dotnet" style="display:none">BandpassImage</span><span data-if="python" style="display:none">bandpass_image</span></a></code>, 
<code><a href="lines_gauss.html"><span data-if="hdevelop" style="display:inline">lines_gauss</span><span data-if="c" style="display:none">lines_gauss</span><span data-if="cpp" style="display:none">LinesGauss</span><span data-if="com" style="display:none">LinesGauss</span><span data-if="dotnet" style="display:none">LinesGauss</span><span data-if="python" style="display:none">lines_gauss</span></a></code>, 
<code><a href="lines_facet.html"><span data-if="hdevelop" style="display:inline">lines_facet</span><span data-if="c" style="display:none">lines_facet</span><span data-if="cpp" style="display:none">LinesFacet</span><span data-if="com" style="display:none">LinesFacet</span><span data-if="dotnet" style="display:none">LinesFacet</span><span data-if="python" style="display:none">lines_facet</span></a></code>
</p>
<h2 id="sec_references">References</h2>
<p>

S.Lanser, W.Eckstein: “Eine Modifikation des Deriche-Verfahrens zur
Kantendetektion”; 13. DAGM-Symposium, München; Informatik
Fachberichte 290; Seite 151 - 158; Springer-Verlag; 1991.
<br>
S.Lanser: “Detektion von Stufenkanten mittels rekursiver Filter
nach Deriche”; Diplomarbeit; Technische Universität München,
Institut für Informatik, Lehrstuhl Prof. Radig; 1991.
<br>
J.Canny: “Finding Edges and Lines in Images”; Report, AI-TR-720;
M.I.T. Artificial Intelligence Lab., Cambridge; 1983.
<br>
J.Canny: “A Computational Approach to Edge Detection”; IEEE
Transactions on Pattern Analysis and Machine Intelligence; PAMI-8,
vol. 6; S. 679-698; 1986.
<br>
R.Deriche: “Using Canny's Criteria to Derive a Recursively
Implemented Optimal Edge Detector”; International Journal of
Computer Vision; vol. 1, no. 2; S. 167-187; 1987.
<br>
R.Deriche: “Optimal Edge Detection Using Recursive Filtering”;
Proc. of the First International Conference on Computer Vision,
London; S. 501-505; 1987.
<br>
R.Deriche: “Fast Algorithms for Low-Level Vision”; IEEE
Transactions on Pattern Analysis and Machine Intelligence; PAMI-12,
no. 1; S. 78-87; 1990.
<br>
S.Castan, J.Zhao und J.Shen: “Optimal Filter for Edge Detection
Methods and Results”; Proc. of the First European Conference on
Computer Vision, Antibes; Lecture Notes on computer Science;
no. 427; S. 12-17; Springer-Verlag; 1990.
</p>
<h2 id="sec_module">模块</h2>
<p>
2D 度量</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
